package com.wjggy.core.common.page;


import java.io.Serializable;
import java.util.List;

import org.apache.ibatis.session.RowBounds;


/**
 * 分页信息
 * 第一页从1开始
 * @author badqiu
 */
public class Page extends RowBounds  implements Serializable 
{	
	protected List  result;
	protected int pageSize=10;
	protected int pageNumber=1;
	protected int totalCount = 0;
	protected String toUrl="";
	public Page(){}
	public Page(int pageSize,int pageNumber){
		 this.pageSize=pageSize;
		 this.pageNumber=pageNumber;
	}
	public Page(List result, int pageSize, int pageNumber, int totalCount,
			String toUrl) {
		this.result = result;
		this.pageSize = pageSize;
		this.pageNumber = pageNumber;
		this.totalCount = totalCount;
		this.toUrl = toUrl;
	}
	public List  getResult() {
		return result;
	}
	public void setResult(List  result) {
		this.result = result;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getPageNumber() {
		PageUtil.checkPage(this);
//		System.out.println("getNuber");
		return pageNumber;
	}
	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public String getToUrl() {
		return toUrl;
	}
	public void setToUrl(String toUrl) {
		this.toUrl = toUrl;
	}
}

